/*****************************************************\
* Copyright (c) 2019 The Agile Authors. All rights reserved.
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.

* Author:         dzlua - https://gitee.com/dzlua/
* Email:          505544956@qq.com
* FileName:       test.h
* Create Time:    2019/01/18 15:59:53
* Description:    for test
\****************************************************/

#ifndef TEST_TEST_H
#define TEST_TEST_H

#include <stdexcept>
#include <sstream>

#define TEST(X) 								                              \
	do {									                                      \
		if(X) break;							                                \
		std::ostringstream oss;					                        	\
		oss << "Error " << __FILE__ << ":"<<__LINE__ << " "<<#X;	\
		throw std::runtime_error(oss.str());			              	\
	} while(0)	
 
 
#endif